home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Power Tools for Macintosh
/
Power Tools for Macintosh (SoftBit)(1992).iso
/
Applications
/
Alpha 4.01
/
Alpha.4.01
/
Alpha.4.01.rsrc
/
STR#_129.txt
< prev
next >
Wrap
Text File
|
1991-10-22
|
5KB
|
407 lines
optional. Ifdefs can not be nested.
the second set will be loaded. The else clause is
the first set of definitions will be loaded. Otherwise
#define TAG
If 'TAG' is defined as follows:
#endif TAG
<second set of definitions>
#else TAG
<first set of definitions>
#ifdef TAG
commands can be used in a loaded file as follows:
The #define, #ifdef, #else, and #endif preprocessor
current line.
Comments begin with ';' and continue to the end of the
Miscellaneous Syntax Matter
suffix hooks is to restart.
than five characters in length. The only way to remove
in .c is loaded or activated. Suffixes can not be more
executes the macro 'setCMode' whenever a window ending
(suffixHook ".c" setCMode)
For example:
(suffixHook ".<suffix>" <macroName>)
activated. The syntax is:
whenever a file with the correct suffix is opened or
Alpha allows you to specify that a macro be executed
Suffix Hooks
be used in one menu.
windows) cannot be redefined after startup and can only
The 'WINDOWMENU' (the menu that allows selection of
WINDOWMENU
FSETMENU
MACROMENU
ACMDMENU
VARMENU
FLAGMENU
TILEMENU
when used as menu item text:
The following strings have the obvious special meanings
as well as through macros.
(deleteMenu "name")
(insertMenu "name")
deleted from the menu bar by the syntax:
Once the menus are created, they can be inserted and
( Disables the item.
a keyboard equivalent.
/ Followed by a character, sets up
the character style of the item.
< Followed by B, I, U, O, or S, sets
item with that character.
! Followed by a character, marks the
that icon to the item.
^ Followed by an icon number, adds
; or Return Separates multiple items.
-------------- -----
Meta-character Usage
characters can be embedded in the strings:
'AlphaBits' file for an example. The following meta
through the bindings. The syntax is dead simple. See the
be in the menus, as opposed to being merely callable
contain names of functions or macros that just HAVE to
Alpha allows the the user to build custom menus which
User-defined Menus
file-pathname,
appending '/<char>' to the end ONLY of the complete
Command equivalents can be attached to items by
: : )
"<pathname>"
(special
complete pathname with the following syntax:
from 'File:Open Special'. These files are specified by
Files can be attached to a hierarchical menu hanging
The 'Open Special' Menu
(set dumString "the string")
in an analogous fashion:
There are also a few string variables, which are bound
(set sillyVar on)
respectively, so the above example could be written:
The values 'on' and 'off' map to '1' and '0',
(set sillyVar 1)
ALPHA. Variables can be assigned as follows:
There are many user-definable integer variables in
Assigning Values to Variables
(ubind <ascii code> [modifier str])
(ubind '\<2-digit hex key code>' [modifier str])
(ubind '<single character>' [modifier str])
The following forms allow bindings to be removed:
Unbindings
by using an external tool like 'ResEdit'.
over bindings. Command equivalents can only be changed
Note that menu item command equivalents take precedence
"#define MACII ....."
comment out the line:
optional. To use ALPHA with an original mac keyboard,
machine-dependent. In both forms, the modifier string is
machine-independent, the second form is
the 'keyCode' function. While the first form is
The key code for any given key can be obtained by using
(bind '\03' <cs> forwardChar)
be bound by using the keycode for the 'f' key:
With the standard US keyboard, 'forwardChar' could also
(bind 'f' <cs> forwardChar)
'forwardChar':
The following line binds cmd-shift-f to the function
x - prefixChar modifier
e - escape modifier
z - control modifier
s - shift modifier
o - option modifier
c - command modifier
containing one or more of:
where c is a character, 'modifier string' is a string
(bind '<character>' [modifier string] funcName)
statement such as:
keystroke. One way to bind a function is with a
Any function or loaded macro can be bound to any single
Key Bindings
types of statements:
The language that Alpha recognizes has several different
the hilited text get loaded.
changes to "Load Selection", and only
3) If a selection is hilited, the above item
an entire window at once.
2) The "Load Window" item of the Customize menu loads
1) The 'AlphaBits' file is always loaded at startup.
in three ways:
in ordinary text files. The customizations can be loaded
written in language that Alpha can recognize, and stored
definitions, and macros. All three customizations are
Alpha can be customized through key bindings, variable
Customizing ALPHA